﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo03
{
    class Program
    {
        static void Main(string[] args)
        {
            ITree tr = new Cat();
            Tree(tr);

            ISwim sw = new Duck();
            Swim(sw);

            Animal am = new Dog();
            eat(am);
        }
        

        static void Tree(ITree tr) {
            tr.Tree();
        }
        static void Swim(ISwim sw)
        {
            sw.swim();
        }
        static void eat(Animal am)
        {
            am.eat();
        }
          
    }
}
